using System.Data.Entity.ModelConfiguration;

namespace CrawlerFramework.Models.Mapping
{
    public class CrawlHistoryMap : EntityTypeConfiguration<CrawlHistory>
    {
        public CrawlHistoryMap()
        {
            // Primary Key
            HasKey(t => t.CrawlHistoryId);

            

            // Properties
            // Table & Column Mappings
            ToTable("CrawlHistory");
            Property(t => t.CrawlHistoryId).HasColumnName("CrawlHistoryId");
            Property(t => t.ScheduledJobGuid).HasColumnName("ScheduledJobGuid");
            Property(t => t.StartDate).HasColumnName("StartDate");
            Property(t => t.TotalLinks).HasColumnName("TotalLinks");
            Property(t => t.SuccessCount).HasColumnName("SuccessCount");
            Property(t => t.ErrorCount).HasColumnName("ErrorCount");
            Property(t => t.EndDate).HasColumnName("EndDate");
        }
    }
}
